﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Phone_Client.Commands_Utils;

namespace Phone_Client.ViewModels
{
    public class SubscriptionPageFeedVM : IViewModelBase
    {
        #region Fields

        private String _title, _author;
        private bool _isfeedselected;
        private ICommand _detailscmd;

        #endregion

        #region Properties

        public String Title 
        {
            get { return _title; }
            set
            {
                if (_title == value) return;
                _title = value;
                RaisePropertyChanged("Title");
            }
        }

        public String Author
        {
            get { return _author; }
            set
            {
                if (_author == value) return;
                _author = value;
                RaisePropertyChanged("Author");
            }
        }

        public bool IsFeedSelected
        {
            get { return _isfeedselected; }
            set
            {
                if (_isfeedselected == value) return;
                _isfeedselected = value;
                RaisePropertyChanged("IsFeedSelected");
            }
        }

        #endregion

        #region Commands

        public ICommand DetailsCmd
        {
            get { return _detailscmd; }
        }

        #endregion

        #region Commands Functions

        public void DetailsFunc() {}

        #endregion

        #region Functions

        #endregion

        #region Ctor
       
        public SubscriptionPageFeedVM(String title, String author)
        {
            if (!String.IsNullOrWhiteSpace(title) && !String.IsNullOrWhiteSpace(author))
            {
                _title = title;
                _author = author;
                _isfeedselected = false;
                _detailscmd = new RelayCommand(DetailsFunc) { IsEnabled = true };
            }
        }
        
        #endregion
    }
}
